package com.atguigu.lease.web.admin.context;

import com.atguigu.lease.model.entity.SystemUser;

public class LoginUserContext {
    private static final ThreadLocal<SystemUser> threadLocal = new ThreadLocal<>();

    public static void setUser(SystemUser systemUser){
        threadLocal.set(systemUser);
    }

    public static SystemUser getUser(){
        return threadLocal.get();
    }

    public static void removeUser(){
        threadLocal.remove();
    }
}
